package com.mainService.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class SysConfig {
    @Value("${server.port}")
    private String port;

    //项目启动的时候 访问的地址
    private String url;
    @PostConstruct
    public void init() {
        this.url = "http://localhost:" + port + "/index";
    }

    public String getUrl() {
        return url;
    }
    public String getPort() {
        return port;
    }
}
